﻿namespace SRM.Core.Models.Base
{
    public class LoginUser
    {
        private static LoginUser _singleton;
        public static LoginUser LoginUsers
        {
            get
            {
                if (_singleton == null)
                    _singleton = new LoginUser();
                return _singleton;
            }
        }

        /// <summary>
        /// 供应商Id
        /// </summary>
        public string SupplierId { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        public string SupplierNo { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; }

        /// <summary>
        /// 登录人
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 是否为管理员
        /// </summary>
        public bool IsHQ
        {
            get
            {
                if (string.IsNullOrEmpty(_singleton.SupplierNo))
                    return true;
                else
                    return false;
            }
        }
    }
}
